package com.gxa.dr2.pojo;


import java.sql.Timestamp;
import java.util.Objects;

public class Permission {

  private Integer permissionId;
  private String permissionName;
  private String permissionUrl;
  private Integer permissionLevel;
  private Integer parentId;
  private Integer isMenu;
  private Timestamp createTime;
  private Timestamp updateTime;
  private Integer isDeleted;

  public Permission() {
  }

  public Integer getPermissionId() {
    return permissionId;
  }

  public void setPermissionId(Integer permissionId) {
    this.permissionId = permissionId;
  }


  public String getPermissionName() {
    return permissionName;
  }

  public void setPermissionName(String permissionName) {
    this.permissionName = permissionName;
  }


  public String getPermissionUrl() {
    return permissionUrl;
  }

  public void setPermissionUrl(String permissionUrl) {
    this.permissionUrl = permissionUrl;
  }


  public Integer getPermissionLevel() {
    return permissionLevel;
  }

  public void setPermissionLevel(Integer permissionLevel) {
    this.permissionLevel = permissionLevel;
  }


  public Integer getParentId() {
    return parentId;
  }

  public void setParentId(Integer parentId) {
    this.parentId = parentId;
  }


  public Integer getIsMenu() {
    return isMenu;
  }

  public void setIsMenu(Integer isMenu) {
    this.isMenu = isMenu;
  }


  public Timestamp getCreateTime() {
    return createTime;
  }

  public void setCreateTime(Timestamp createTime) {
    this.createTime = createTime;
  }


  public Timestamp getUpdateTime() {
    return updateTime;
  }

  public void setUpdateTime(Timestamp updateTime) {
    this.updateTime = updateTime;
  }


  public Integer getIsDeleted() {
    return isDeleted;
  }

  public void setIsDeleted(Integer isDeleted) {
    this.isDeleted = isDeleted;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    Permission that = (Permission) o;
    return Objects.equals(permissionId, that.permissionId) &&
            Objects.equals(permissionName, that.permissionName) &&
            Objects.equals(permissionUrl, that.permissionUrl) &&
            Objects.equals(permissionLevel, that.permissionLevel) &&
            Objects.equals(parentId, that.parentId) &&
            Objects.equals(isMenu, that.isMenu) &&
            Objects.equals(createTime, that.createTime) &&
            Objects.equals(updateTime, that.updateTime) &&
            Objects.equals(isDeleted, that.isDeleted);
  }

  @Override
  public int hashCode() {
    return Objects.hash(permissionId, permissionName, permissionUrl, permissionLevel, parentId, isMenu, createTime, updateTime, isDeleted);
  }

  @Override
  public String toString() {
    return "Permission{" +
            "permissionId=" + permissionId +
            ", permissionName='" + permissionName + '\'' +
            ", permissionUrl='" + permissionUrl + '\'' +
            ", permissionLevel=" + permissionLevel +
            ", parentId=" + parentId +
            ", isMenu=" + isMenu +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", isDeleted=" + isDeleted +
            '}';
  }
}
